<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
     <style>
          .box{
            width: 500px;
            height: 300px;
            background-color: pink;
            display: flex;
            /* flex-wrap: wrap; */
            flex-shrink: 0;


        }
        .box1,.box2,.box3{
            width: 200px;
            height: 200px;
            /* flex-shrink: 0;默认值不会为0,所以如果子元素长宽的和加起来超过父元素的话会自动调节子元素的长宽 */
        }

        .box1{
            background-color: chartreuse;
        }

        .box2{
            background-color: coral;
        }

        .box3{
            background-color: cornflowerblue;
        }
     </style>
</head>
<body>
    <div class="box">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box2"></div>
        <div class="box2"></div>
        <div class="box2"></div>
        <div class="box2"></div>
    </div>  
</body>
</html>